class Solution {
public:
    int poorPigs(int buckets, int minutesToDie, int minutesToTest) {
        int labels = minutesToTest / minutesToDie + 1;
        int res = 0;
        int accumulation = 1;
        while(accumulation < buckets)
        {
            accumulation *= labels;
            res++;
        }
        return res;
    }
};
